﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SimulChess
{
    public class BoardPosition
    {
        public PieceColor BlockColor;
        public bool Occupied;

        public BoardPosition(PieceColor Color)
        {
            this.BlockColor = Color;
            this.Occupied = false;
        }
    }

    public class ChessBoard
    {
        public BoardPosition[,] Position;

        public ChessBoard()
        {
            this.Position = new BoardPosition[8, 8];

            for (int y = 0; y < 8; y++)
            {
                for (int x = 0; x < 8; x++)
                {
                    if ((((x % 2) == 0) && ((y % 2) == 0)) ||
                        (((x % 2) != 0) && ((y % 2) != 0)))
                    {
                        this.Position[x, y] = new BoardPosition(PieceColor.white);
                    }
                    else
                    {
                        this.Position[x, y] = new BoardPosition(PieceColor.black);
                    }
                }
            }
        }
    }
}